<template>
  <div>
    <p class="title">认证审核</p>
    <div>
      <span>状态：</span>
      <el-select v-model="value" placeholder="请选择">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option>
      </el-select>
    </div>
    <div>
      <div class="tab">
        <el-table :data="tableData" border style="width: 100%">
          <el-table-column type="index" label="序号" width="100px">
          </el-table-column>

          <el-table-column prop="acname" label="用户名称" show-overflow-tooltip>
          </el-table-column>
          <el-table-column prop="phone" label="手机号" show-overflow-tooltip>
          </el-table-column>
          <el-table-column prop="wxphone" label="微信号" show-overflow-tooltip>
          </el-table-column>
          <el-table-column
            prop="username"
            label="用户姓名"
            show-overflow-tooltip
          >
          </el-table-column>
          <el-table-column prop="card" label="身份证号" show-overflow-tooltip>
          </el-table-column>
          <el-table-column prop="state" label="状态" show-overflow-tooltip>
          </el-table-column>
          <el-table-column prop="use" label="操作" show-overflow-tooltip>
            <template slot-scope="scope">
              <el-link
                type="primary"
                v-if="scope.row.sh == false"
                @click="audit"
                >审核</el-link
              >
              <el-link type="primary" @click="ck" v-else>查看</el-link>
            </template>
          </el-table-column>
        </el-table>
        <Page
          :total="total"
          :PageNumber.sync="PageNumber"
          :PageSize.sync="PageSize"
          @current-change="changeCurrentPage"
          @size-change="handleSizeChange"
        >
        </Page>
      </div>
    </div>
  </div>
</template>

<script>
import Page from "../../components/page.vue";
export default {
  components: {
    Page,
  },
  data() {
    return {
      PageNumber: 1,
      PageSize: 20,
      total: 50,
      value: "",
      options: [
        {
          value: "全部",
          label: "全部",
        },
        {
          value: "待审核",
          label: "待审核",
        },
        {
          value: "审核通过",
          label: "审核通过",
        },
        {
          value: "审核未通过",
          label: "审核未通过",
        },
      ],

      tableData: [
        {
          acname: "2016-05-02",
          phone: "王小虎",
          wxphone: "上海市普陀区金沙江路 1518 弄",
          username: "777",
          card: "222",
          state: "100",
          use: "2021/03/16",
          sh: false,
        },
        {
          acname: "2016-05-02",
          phone: "王小虎",
          wxphone: "上海市普陀区金沙江路 1518 弄",
          username: "777",
          card: "222",
          state: "100",
          use: "2021/03/16",
          sh: true,
        },
      ],
    };
  },
  methods: {
    //改变当前页数
    changeCurrentPage(val) {
      console.log(val);
    },
    //改变每页显示条数
    handleSizeChange(val) {
      console.log(val);
    },
    audit() {
          this.$router.push("/Home/CheakAudit")
    },
    ck(){
         this.$router.push("/Home/CheakAudit")
    }
  },
};
</script>

<style lang="scss" scoped>
.title {
  margin-top: -10px;
  font-size: 14px;
}
.tab {
  margin-top: 20px;
}
</style>